package com.colin.springbootsource.ioc.xml;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * @author: Colin
 * 2019/12/29 18:28
 * @desc todo
 * @email zhaod@oceansoft.com.cn,colinzhaodong@gmail.com
 */
@Component
public class StudentService {
    private Student student;

    @Autowired
    @Qualifier("bird")
    private Animal animal;

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Animal getAnimal() {
        return animal;
    }

    public void setAnimal(Animal animal) {
        this.animal = animal;
    }

    public String student(){
        return student.toString();
    }

    public String animal(){
        return animal.getName();
    }

    public String hello(){
        return "hello";
    }
}
